<script>
import {defineComponent} from 'vue'

export default defineComponent({
    name: "titleBox",
    props:{
        item:{
            type:[Object],
            default:()=>{
                return{}
            }
        }
    }
})
</script>

<template>
<div>
    <div class="box">
            <img :src="item.coverFileUrl">
            <div  style="font:20px bolder">{{ item.courseTitle }}</div>
            <div>{{ item.learningNum }}人学习</div>
            <div v-if="item.isFree==='1'" style="color: #42b983;font-weight: bolder">免费</div>
            <div v-else-if="item.isDiscount==='1'">现价:<span style="color: red;font-weight: bolder">￥{{item.discountPrice}}</span>&nbsp;原价:<del style="color: gray;font-weight: 300">￥{{item.coursePrice}}</del></div>
            <div v-else>价格<span style="color: red;font-weight: bolder">￥{{item.coursePrice}}</span></div>
    </div>
</div>
</template>

<style scoped lang="less">
img {
  width: 100%;
}
</style>